package com.tyk.bookstore.back.system.model.query;

import com.tyk.bookstore.back.system.model.type.RoleState;
import com.tyk.bookstore.back.system.valid.annotation.RoleFieldValid;
import com.tyk.bookstore.back.system.valid.type.RoleFieldValidType;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.util.Set;

@Data
public class RoleUpdateQuery {
    @Schema(description = "角色ID")
    @NotNull
    private Long id;

    @Schema(description = "角色名称")
    @NotBlank
    @RoleFieldValid(RoleFieldValidType.NAME)
    private String name;

    @Schema(description = "角色字符串")
    @NotBlank
    @RoleFieldValid(RoleFieldValidType.CODE)
    private String code;

    @Schema(description = "角色描述")
    @NotBlank
    @RoleFieldValid(RoleFieldValidType.DESCRIPTION)
    private String description;

    @Schema(description = "角色状态")
    @NotNull
    private RoleState state;

    @Schema(description = "权限ID列表")
    private Set<Long> permissionIdList;

    @Schema(description = "菜单ID列表")
    private Set<Long> menuIdList;
}
